package com.whale.kernel.service.interceptors.log;

import java.lang.reflect.Method;
import java.util.Arrays;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.MethodBeforeAdvice;

public class BeforeLoggerInterceptor implements MethodBeforeAdvice {
	
	private final Logger logger = LoggerFactory.getLogger(getClass());

	public void before(Method method, Object[] methodParameters, Object targetObject)
			throws Throwable {
		logger.info("---------------------------------------------------------------------");	
		logger.info("Start method: " + method);
		logger.info("	params: " + Arrays.toString(methodParameters));
	}

}
